from __future__ import division
from math import *
###***My modules***###
from Init_Cond import *

def f(x, M):
    #Creates initial values for the disk and prints them out
    for a in range(int(N)):

        r.append(r_I + deltar*(a+0.5))
        X.append(2.*r[a]**0.5)
        R_M.append(r[a]/R_Mars)   #Mars
        deltaA.append(2*pi*deltar*(r_I + deltar*(a + 0.5)))

        #Power law surface mass density profile
        if x == 0:
            m.append(2*pi*alpha/(2-p)*((r[a] + deltar/2)**(2-p) - (r[a] - deltar/2)**(2-p)))
            sigma.append(m[a]/deltaA[a])

        #Gaussian surface mass density profile
        elif x == 1:
            #               mass                        centroid    spread
            sigma.append(1.8e7/(5*(2*pi)**(0.5))*exp(-(a-20)**2/(2*1**2)))               #Mars

            m.append(sigma[a]*deltaA[a])

        else:
            print('You have not chosen a valid disk model')
        R.append(r[a]**2 + deltar**2/4)
        I.append(m[a]*R[a])
        w.append((G*M/r[a]**3)**0.5)
        Torque_to_disk.append(0.0)
